<?php


namespace app\api\model;

use think\Model;

/**
 * 主播列表
 * Class AnchorModel
 * @package app\api\model
 */
class AnchorModel extends Model
{

    /**
     * 设置表名
     * @var string
     */
    protected $table = 'te_anchor';

    /**
     *
     * 主播信息
     *
     */
    public static function anchorList($params){

        $where = [];
        #分类搜索
        if (isset($params['cate_id']) && $params['cate_id'] != ''){

            $where[] = ['cate_id','eq',$params['cate_id']];
        }
        return self::where(['status'=>1,'is_deleted'=>0])
            ->where($where)
            ->field('id,img,link')
            ->order('id desc')
            ->select();
    }
}